package club.twelveblog.tblog.service;

import club.twelveblog.tblog.dao.CategoryDao;
import club.twelveblog.tblog.entity.BlogInfo;
import club.twelveblog.tblog.entity.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryService {
    @Autowired
    private CategoryDao categoryDao;

    /**
     * 查找所有分类
     * @return
     */
    public List<Category> findAllCategory() {
        List<Category> categoryList = categoryDao.findAll();
        return categoryList;
    }

}
